Skip to content

Conversation

@adecaro
Copy link
Contributor

@adecaro adecaro commented Dec 3, 2025

This PR does the following:

  • Benchmarks for the validator
  • Refactoring of the benchmark service
  • Two new tools to analyze memory and trace

@adecaro adecaro added this to the Q4/25 milestone Dec 3, 2025
@adecaro adecaro self-assigned this Dec 3, 2025
@adecaro adecaro force-pushed the 1284-dlog-validator-service-benchmark branch 4 times, most recently from 41d63af to 306516e Compare December 4, 2025 16:26
@adecaro adecaro force-pushed the 1284-dlog-validator-service-benchmark branch from 61b9a21 to 314caa9 Compare December 7, 2025 09:24
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
Signed-off-by: Angelo De Caro <[email protected]>
"github.com/hyperledger-labs/fabric-token-sdk/token/core/zkatdlog/nogh/v1/issue/mock"
v1 "github.com/hyperledger-labs/fabric-token-sdk/token/core/zkatdlog/nogh/v1/setup"
"github.com/hyperledger-labs/fabric-token-sdk/token/core/zkatdlog/nogh/v1/token"
benchmark2 "github.com/hyperledger-labs/fabric-token-sdk/token/services/benchmark"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there appears to be just one imported benachmark package left here - why isn't it just called "benchmark"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it conflicts with a struct name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these keys in the git? wouldn't it be better to create them on the fly as part of the setup of the tests/benchmarks? e.g., that would make the git more stable when the structure of these keys change for some reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to generate them, an external command needs to be invoked.
To generate these keys on the fly, I would need to make sure that the tool is installed and then from Go invoke a shell command. Not obvious.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the difference between the following?
token/core/zkatdlog/nogh/v1/transfer_test.go
token/core/zkatdlog/nogh/v1/transfer/transfer_test.go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

token/core/zkatdlog/nogh/v1/transfer/transfer_test.go: it is related to ZKP + serialization
token/core/zkatdlog/nogh/v1/transfer_test.go is the above plus additional generation of the Token-SDK action.


func TestValidator(t *testing.T) {
t.Run("Validator is called correctly with a non-anonymous issue action", func(t *testing.T) {
configurations, err := benchmark.NewSetupConfigurations("./../testdata", []uint64{testUseCase.Bits}, []math.CurveID{testUseCase.CurveID})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the following 4 lines of code are repeated in many tests here. Consider using some common getter.

Signed-off-by: Angelo De Caro <[email protected]>
@adecaro adecaro requested a review from aaadir December 10, 2025 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants